var e = getApp(), s = require("../../../api.js");

Page({
    data: {
        order: {},
        style: null,
        id: ""
    },
    onLoad: function(s) {
        this.setData({
            style: s.type,
            id: s.id
        }), s.uid && e.shareCouponsMessage(s.uid);
    },
    onReady: function() {},
    onShow: function() {
        var a = this;
        e.request({
            url: s.accident.details,
            method: "post",
            data: {
                id: a.data.id
            },
            success: function(e) {
                console.log("事故详情", e), 1 == e.code ? a.setData({
                    order: e.data
                }) : wx.showToast({
                    title: e.msg,
                    icon: "loading"
                });
            }
        });
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        var s = e.shareAppMessage().title, a = e.shareAppMessage().imageUrl, t = e.shareAppMessage().desc, o = e.shareAppMessage().path;
        return console.log(e.shareAppMessage()), {
            title: s,
            imageUrl: a,
            desc: t,
            path: o
        };
    }
});